<pro-header></pro-header>
<nz-card [nzBordered]="false">
    <form nz-form [formGroup]="bannerForm"
          (ngSubmit)="save()"
    >
        <!--标题-->

        <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="6">
                <label  nz-form-item-required>标题</label>
            </div>
            <div nz-col [nzSpan]="12" >
                <nz-input formControlName="title"></nz-input>
            </div>

        </div>


        <!--type-->

        <div nz-form-item nz-row>
            <div nz-form-label nz-col [nzSpan]="6">
                <label for="type" nz-form-item-required>类型</label>
            </div>
            <div nz-col [nzSpan]="12" id="type">
                <nz-select formControlName="type">
                    <!--0 仅展示 1外部链接 2 内部链接-->
                    <nz-option [nzValue]="0" nzLabel="仅链接"></nz-option>
                    <nz-option [nzValue]="1" nzLabel="外部链接"></nz-option>
                    <nz-option [nzValue]="2" nzLabel="内部链接"></nz-option>
                </nz-select>
            </div>
        </div>

        <!--图片-->

        <div nz-form-item nz-row id="img">
            <div nz-form-label nz-col [nzSpan]="6">
                <label for="img" nz-form-item-required>图片</label>
            </div>
            <div nz-col [nzSpan]="12">
                <app-myimgupload (responseUrl)="uploadimg($event)" #imgload></app-myimgupload>
                <nz-input [nzType]="'hidden'" formControlName="img"></nz-input>
            </div>
        </div>

        <!--地址-->

        <div nz-form-item nz-row id="url">

            <div nz-form-label nz-col [nzSpan]="6">
                <label for="url" nz-form-item-required>地址</label>
            </div>

            <div nz-col [nzSpan]="12">
                <nz-input formControlName="url"></nz-input>
            </div>

        </div>


        <!--保存-->
        <div nz-form-item nz-row>
            <div nz-col   nz-form-label [nzSpan]="6"></div>
            <div nz-col [nzSpan]="12">
                <button nz-button [nzType]="'primary'" [nzSize]="'large'" [disabled]="!bannerForm.valid">保存</button>
            </div>
        </div>
    </form>
</nz-card>
